import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
    {
        path: '/',  //默认页面
        redirect: '/shouye'
    },
    {
        path: '/shouye',  //首页
        name: 'shouye',
        component: () => import('../views/shouye/None.vue'),
        children: [
            {
                path: '/shouye/tuijian', //推荐
                name: 'tuijian',
                component: () => import('../views/shouye/tuijian/Test1.vue')
            },
            {
                path: '/shouye/meishi', //美食
                name: 'meishi',
                component: () => import('../views/shouye/meishi/Test2.vue')
            },
            {
                path: '/shouye/chuanda', //穿搭
                name: 'chuanda',
                component: () => import('../views/shouye/chuanda/Test3.vue')
            },
            {
                path: '/shouye/fengjin', //风景
                name: 'fengjin',
                component: () => import('../views/shouye/fengjin/Test4.vue')
            }, 
    ]
    },
    {
        path: '/found', //发现页面
        name: 'found',
        component: () => import('../views/release/Found.vue')
    },
    {
        path: '/message', //消息页面
        name: 'message',
        component: () => import('../views/notice/Message.vue')
    },
    {
        path: '/my',  //我的页面
        name: 'my',
        component: () => import('../views/my/My.vue')
    },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes,
    linkActiveClass: 'active'
})

export default router //导出